Hello everybody,
I'm experiencing a quite boring problem.
Well, here's the environment.
We have a DOORS server 8.2 running on Linux, and several DOORS client 8.3 running on Windows. Everything seems to work fine, but things go bad when trying to restore or purge or, what is worse, perform various actions.
I have identified the source of that problem: file accesses on the server might be wrong. In the v6data folder, some are owned by root user, some by doors user.
It appears than new files created in the hach table of the database are created under root. Hence, no way for DOORS to access these files once they are created.
I suspect some installation steps migth have been shortened...
I'll obviously like to avoid a new clean installation. Is there a simple and efficient solution?
I give 2 possibilites, tell me if they are correct:
-
give all the root abilities to the doors user
-
create a script that changes the file owners (a kind of global chown)
Thanks for your attention, and don't blame me for mistakes ;-)
Cheers
jdoucement - Mon Apr 11 05:51:38 EDT 2011 |
|
Re: Fixing database file accesses under Linux? Richard_Hesketh - Tue Apr 12 06:49:05 EDT 2011
First thing to do is find out which user is running the 'doorsd' process on the server. A 'ps' listing should do it - options depending on your Linux variant, but a safe bet would be:
ps aux | grep doorsd
The username is the first column of data returned. Hopefully it's the 'doors' user, and not 'root', though it sounds like it may be the latter. Either way, the 'doors' user should have as a minimum 'rw' on all files, and 'rwx' on all directories from the DOORS 'data' directory downwards; they probably will have, IF they own the files.
For simplicity, you could (assuming RedHat Linux):
chown -R doors:doors /path/to/doors/data
You'll need to do the same to the DOORS installation directory, to ensure that the 'doors' user can execute 'doorsd', etc.
Finally, you need to make sure that the 'doorsd' process runs as the 'doors' user. To do this, modify any startup script for doorsd. Where the script executes doorsd, you'll need to sudo it as 'doors'. So, for example, if the line in your startup script is something like:
/opt/ibm/doors/bin/doorsd -data $DOORSDATA -port 36677 ...
change it to:
sudo -u doors /opt/ibm/doors/bin/doorsd -data $DOORSDATA -port 36677 ...
I think that's it. Let us know how it goes...
|
|
Re: Fixing database file accesses under Linux? jdoucement - Tue Apr 12 08:37:01 EDT 2011 Richard_Hesketh - Tue Apr 12 06:49:05 EDT 2011
First thing to do is find out which user is running the 'doorsd' process on the server. A 'ps' listing should do it - options depending on your Linux variant, but a safe bet would be:
ps aux | grep doorsd
The username is the first column of data returned. Hopefully it's the 'doors' user, and not 'root', though it sounds like it may be the latter. Either way, the 'doors' user should have as a minimum 'rw' on all files, and 'rwx' on all directories from the DOORS 'data' directory downwards; they probably will have, IF they own the files.
For simplicity, you could (assuming RedHat Linux):
chown -R doors:doors /path/to/doors/data
You'll need to do the same to the DOORS installation directory, to ensure that the 'doors' user can execute 'doorsd', etc.
Finally, you need to make sure that the 'doorsd' process runs as the 'doors' user. To do this, modify any startup script for doorsd. Where the script executes doorsd, you'll need to sudo it as 'doors'. So, for example, if the line in your startup script is something like:
/opt/ibm/doors/bin/doorsd -data $DOORSDATA -port 36677 ...
change it to:
sudo -u doors /opt/ibm/doors/bin/doorsd -data $DOORSDATA -port 36677 ...
I think that's it. Let us know how it goes...
Thanks a lot for your reply.
Well, what you write looks cool. It seems that it could be solved in a much easier way than I expected.
I'll give a try soon, I'll let you know!
|
|
Re: Fixing database file accesses under Linux? jdoucement - Tue Apr 12 09:57:11 EDT 2011 jdoucement - Tue Apr 12 08:37:01 EDT 2011
Thanks a lot for your reply.
Well, what you write looks cool. It seems that it could be solved in a much easier way than I expected.
I'll give a try soon, I'll let you know!
Okay Richard, here we are.
You solution works, but... (a but always appears)
I have tried with rw rigths for files as you told me, it only works with rwx for me (server running on CentOS).
Anyway, thanks again ;o)
|
|
Re: Fixing database file accesses under Linux? Richard_Hesketh - Wed Apr 13 03:43:49 EDT 2011 jdoucement - Tue Apr 12 09:57:11 EDT 2011
Okay Richard, here we are.
You solution works, but... (a but always appears)
I have tried with rw rigths for files as you told me, it only works with rwx for me (server running on CentOS).
Anyway, thanks again ;o)
Glad it's sorted for you. What I perhaps didn't make clear, is if you set 'rw' on all files & directories under the doors 'data' directory, you'l have problems, because a UNIX/Linux user must have 'x' on directories to open them.
You're very welcome, and thanks for pointing out the flaw in my guidance. Hopefully this will help others too. :)
|
|